package com.zgx.plus.system.api.vos;

import com.zgx.plus.system.api.pos.SysUser;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = false)
@Data
public class SysUserVo extends SysUser {

    private SysDeptVo dept;

    /**
     *      * 角色对象
     *      
     */
    private List<SysRoleVo> roles;

    /**
     *      * 角色组
     *      
     */
    private Long[] roleIds;

    /**
     *      * 岗位组
     *      
     */
    private Long[] postIds;
    /**
     *      * 岗位对象
     *      
     */
    private List<SysPostVo> posts;

    /**
     *      * 角色ID
     *      
     */
    private Long roleId;

    public static boolean isAdmin(Long userId) {
        return userId != null && 1L == userId;
    }


}
